package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyClass {
    public static void main(String []args){
        Schema schema = new Schema(1,"com.lanou.projecta.db");
        //创建第一张表
        Entity person = schema.addEntity("HeadLine");
        //数据库字段名
        person.addLongProperty("_id").primaryKey().autoincrement();
        person.addStringProperty("title");
        person.addStringProperty("disgest");
        person.addIntProperty("replyCount");
        person.addStringProperty("imgsrc");
        person.addIntProperty("imageType");
        person.addIntProperty("imagenum");
        person.addStringProperty("imgsrc1");
        person.addStringProperty("imgsrc2");
        //第二张表
        Entity dog = schema.addEntity("Dog");
        dog.addStringProperty("type");

        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
